package com.maple.common.utils

import android.content.Context

/**
 * Tip:
 * Create by SeVen on 2024/4/28 10:08
 */
object PackageUtils {
    fun getPackageInfo(context: Context): Pair<Int, String?> {
        val packageManager = context.packageManager
        val packageName = context.packageName
        val packageInfo = packageManager.getPackageInfo(packageName, 0)
        val appVersionName = packageInfo.versionName
        val appVersionCode = packageInfo.versionCode
        return Pair(appVersionCode, appVersionName)
    }
}